unit GVEditorFormUnit;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, StdCtrls, ActnList, ComCtrls, VislSchemeEditor, VislSchemeView,
  CommandConsole, WrkspcCfgrtn;

type

  { TGVeditForm }

  TGVeditForm = class(TForm)
    ActionList1: TActionList;
    ConsoleInput: TComboBox;
    ConsoleEcho: TMemo;
    PaintBox1: TPaintBox;
    ConsolePanel: TPanel;
    Panel2: TPanel;
    Panel3: TPanel;
    ScrollBox1: TScrollBox;
    Splitter1: TSplitter;
    Splitter2: TSplitter;
    ConsoleStatusBar: TStatusBar;
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    VislSchemeEditor1: TVislSchemeEditor;
    VislSchemeView1: TVislSchemeView;
    procedure ConsoleInputKeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  GVeditForm: TGVeditForm;

implementation

uses
  LCLType;

{ TGVeditForm }

procedure TGVeditForm.ConsoleInputKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  CmdStr: string;
begin
  if (Key = VK_RETURN) then begin
    CmdStr := trim(ConsoleInput.Text);
    if CmdStr='' then exit;
    ConsoleInput.Text := '';
    ConsoleEcho.Append(IIntegralConfig.iiExeCommand(CmdStr));
    if ConsoleInput.Items.IndexOf(CmdStr)<0 then ConsoleInput.Items.Append(CmdStr);
  end;
end;

initialization
  {$I gveditorformunit.lrs}

end.
